Skip to content

rfc: document or-slots and xor-slots in jobspec specifications - #534

Open
zekemorton wants to merge 2 commits into
flux-framework:masterfrom
zekemorton:or_slots
Open

zekemorton wants to merge 2 commits into
flux-framework:masterfrom
zekemorton:or_slots

Conversation

@zekemorton

Copy link
Copy Markdown

Add documentation for or-slots and xor-slots to RFC 14 and RFC 25.

RFC 14 (Canonical Jobspec)

  • Extended slot definition to describe or-slot behavior (sibling slots as alternatives)
  • Added new xor_slot reserved resource type specification
  • Added comparison table and three use cases with examples
  • Updated JSON schema to support xor_slot type

RFC 25 (Jobspec V1)

  • Added note clarifying V1 does not support or-slots or xor-slots
  • References RFC 14 for users needing alternative slot configurations

Or-slots use dynamic programming for optimal slot selection during traversal.
Xor-slots expand into distinct candidate jobspecs before traversal with first-match selection.
Both require the flexible traverser implementation.

@github-actions

Copy link
Copy Markdown

⚠️ linkcheck failed with status code 2

@zekemorton

Copy link
Copy Markdown
Author

@milroy do you mind giving this a first pass when you get a chance?

@milroy milroy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far! Please add a bit more description where I indicated. After that this is good to merge as far as I'm concerned!

Comment thread spec_14.rst Outdated
Comment on lines +258 to +259
A resource type of ``type: xor_slot`` SHALL indicate an exclusive alternative
resource grouping that is expanded into distinct jobspec branches before

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want to disambiguate the "exclusive" adjective here as we'll soon support non-exclusive resources in a slot. This statement should make it clear that exactly one of the XOR slots will be allocated or reserved.

Comment thread spec_14.rst Outdated
Comment on lines +261 to +262
internally, and the flexible traverser tries the expanded branches sequentially
until a match is found (first-match strategy).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to emphasize that the XOR slot order effectively encodes preference.

Comment thread spec_14.rst Outdated
Comment on lines +274 to +276
Nested ``xor_slot`` resources are supported. When processing nested xor-slots,
the expansion produces all combinations of the xor branches, and each
combination is tried as a separate candidate jobspec.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a phrase mentioning the need to limit the number of candidates, and the configuration option that sets the limit.

@github-actions

Copy link
Copy Markdown

⚠️ linkcheck failed with status code 2

@zekemorton
zekemorton force-pushed the or_slots branch 2 times, most recently from 457d125 to fae43f5 Compare September 2, 2026 21:11
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

⚠️ linkcheck failed with status code 2

@milroy milroy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks good to me. Please change the commit messages to conform to the "Problem: ... Add" structure before merging. It would also be good to get a review from @garlick or @grondo.

@milroy
milroy requested review from garlick and grondo September 15, 2026 22:27
@mergify

mergify Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Zeke Chadron Blair Morton added 2 commits September 15, 2026 15:36
Problem: RFC 14 does not define the flexible traverser alternative slot forms, leaving their representation and selection behavior unspecified.

Document sibling or-slots and the xor_slot resource type, including their selection semantics, nesting, limits, and examples. Add xor_slot to the schema.

Assisted-by: Claude:claude-opus-4.8
Problem: RFC 25 does not state whether V1 jobspec supports the alternative slot configurations defined by RFC 14.

Clarify that V1 excludes sibling or-slots and xor_slot resources, and direct users to the canonical jobspec format.

Assisted-by: Claude:claude-opus-4.8
@github-actions

Copy link
Copy Markdown

⚠️ linkcheck failed with status code 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants